<template>
	
	<view class="asset" style="background: white;float: left;padding-bottom: 5%;">
		<view class="head" style="z-index: 999;">
			<view class="head_texts" @click="black()"><image src="../../../static/public/img/fh.png"
				style="width: 18px;height: 18px;position: absolute;top:33px;left: 15px;"></image>返回</view>
			<view class="ss">投资详情</view>
		</view>
		
		<view style="width: 100%;padding: 3%;margin-top: 3%;">
			<text style="color:#cd0006;font-size: 16px;font-weight: 600;" v-if="data.type == 1" >高斯贝尔</text>
			<text style="color:#cd0006;font-size: 16px;font-weight: 600;" v-if="data.type == 2" >东方通讯</text>
			<text style="color:#cd0006;font-size: 16px;font-weight: 600;" v-if="data.type == 3" >立讯精密</text>
			<text style="font-size: 12px;margin-left: 3%;">第{{data.order_no}}笔</text>
		</view>
		<view style="width: 100%;padding-left: 3%;margin-top: 3%;">
			<view style="color:#999;font-size: 15px;font-weight: 400;border-left: 2px solid #cd0006;padding-left: 10px;width:20%;float: left;">版块排名</view>
			<view style="font-size: 12px;margin-left: 3%;border-bottom: 1px solid #999;width:65%;padding-top: 3%;float: left;"></view>
		</view>
		
		<view style="width: 100%;padding: 3%;margin-top: 3%;float: left;">
			<view :style="{'width':'8%','height': '10px','background-color': item.titleColor,'font-size': '12px','float': 'left','color':'white','height': '20px','line-height': '20px','text-align': 'center','margin-left': '1%'}" v-for="(item,index) in data.open_number">{{item.name}}</view>
		</view>
		
		<view style="width: 100%;padding-left: 3%;margin-top: 5%;float: left;">
			<view style="color:#999;font-size: 15px;font-weight: 400;border-left: 2px solid #cd0006;padding-left: 10px;width:20%;float: left;">投资详情</view>
			<view style="font-size: 12px;margin-left: 3%;border-bottom: 1px solid #999;width:65%;padding-top: 3%;float: left;"></view>
		</view>
		
		<view style="width:100%;padding-left: 3%;margin-top: 3%;float: left;font-size: 14px;">
			<view>投资编号：{{data.pay_order}}</view>
			<view style="margin-top: 3%;">投资金额：{{data.unit_price}}元</view>
			<view style="margin-top: 3%;">获利情况：<text v-if="data.is_prize == 1">获利</text> <text v-else>未获利</text> </view>
			<view style="margin-top: 3%;">投资版块：{{data.number_name}}</view>
			<view style="margin-top: 3%;">投资信息：共一笔</view>
			<view style="margin-top: 3%;">投资时间：{{data.create_time}}</view>
		</view>
		
		<view style="width: 100%;height: 50px;position: fixed;bottom: 0;background: #f8f8f8;line-height: 50px;text-align: center;font-size: 14px;" @click="gogameCenter">继续投资</view>
	</view>
</template>

<script>
	//导入组件
	export default {
		data() {
			return {
				data:[]
			}
		},
		methods: {
			 gogameCenter(){
				 uni.navigateTo({
					url:'/pages/components/gameCenter/gameCenter'
				 })
			 },
			 black(){
				   uni.navigateBack()
			 },
			 home(id){
				 this.$api.request('/api/game/getDetail',{id:id}).then((res)=>{
					 this.data = res.data
				 })
			 }
		},
		onShow() {

		},
		onLoad(option) {
			this.home(option.id)
		}

	}
</script>

<style lang="scss">
	page {
		background-color: #f2f2f2;
	}

	.asset {
	   .head {
	   	background: #151516 !important;
	   	color: #fff;
	   	height: 130rpx;
	   	font-size: 18px;
	   }
	   .ss {
		 text-align: center;
		 line-height: 160rpx;
		 position: absolute;
		 top: 0px;
		 left: 42%;
	   }
	   .head_texts {
	   		font-size: 14px;
	   		margin-left: 9%;
	   		line-height: 160rpx;
	   }
	

	}
</style>
